﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sharp.Migrations;
using Sharp.Data;
using System.Reflection;

namespace Budgeter.Migrations
{
    public static class DatabaseMigrator
    {

        public static void Migrate(string providerName, string connectionString)
        {
            IDataClient dataClient = SharpFactory.Default.CreateDataClient(connectionString, providerName);
            var runner = new Sharp.Migrations.Runner(dataClient, Assembly.GetExecutingAssembly());
            runner.Run(-1);
        }

    }
}
